package yb.ecp.fast.user.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import yb.ecp.fast.user.dao.entity.ProfileDO;
import yb.ecp.fast.user.dao.mapper.base.BaseMapper;
import yb.ecp.fast.user.service.VO.*;

import java.util.List;

/**
 * Created by LiChangjiang on 2017/12/27 0027.
 */
@Mapper
public interface ProfileMapper extends BaseMapper<ProfileVO, ProfileDO> {
    int insert(ProfileDO profileDO);

    ProfileDO selectById(String id);

    List<ProfileDO> list(ProfileConditionVO record);

    int removeById(String id);

    int update(ProfileDO profileDO);

    Integer queryCountByDept(String deptId);

    int getCountByMobile(ProfileDO profileDO);

    int getCountByName(ProfileDO profileDO);

    List<ProfileDO> listByRole(ProfileVO record);

    List<String> getMobilesByWorkSpaceDept(@Param("workSpaceId") String workSpaceId, @Param("deptIds") List<String> deptIds);

    List<ProfileDO> selectByIds(List<String> ids);

    List<ProfileDO> queryBy400Code(@Param("code400") String code400, @Param("exludeUserId") String exludeUserId);

    String getUserIdByErpCode(String erpCode);

    String getJobById(@Param("jobId") String jobId);

    String getJobUserById(@Param("userId") String userId,@Param("userType") Integer userType);

    void createJobUser(@Param("id") String id, @Param("jobId") String jobId, @Param("userId") String userId, @Param("userType") Integer userType,@Param("format") String format);

    void updateJobUser(@Param("jobId") String jobId, @Param("userId") String userId, @Param("format") String format);

    JobDTO getJobNameByUserId(@Param("jobId") String jobId);

    void updateUserAvatorForWx(@Param("userId") String userId, @Param("imgUrl") String imgUrl);

    void setUserJobId(@Param("jobId") String jobId, @Param("userId") String userId);

    List<UserScore> getUserScoreById(@Param("id") String userId);

    void setTechnicianJobId(@Param("jobId") String jobId, @Param("userId") String userId);

    TechnicianVO getTechnician(@Param("userId") String userId);
}